package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 供应商表 supplier
 *
 * @author ruoyi
 */
public class BpmSupplier extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 供应商ID */
    @Excel(name = "供应商序号", cellType = Excel.ColumnType.NUMERIC)
    private Long supplierId;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplierName;

    /** 供应商权限 */
    @Excel(name = "供应商")
    private String supplierDescription;

    /** 供应商排序 */
    @Excel(name = "供应商")
    private Integer contactId;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public BpmSupplier() {

    }

    public BpmSupplier(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    @NotBlank(message = "供应商名称不能为空")
    @Size(min = 0, max = 30, message = "供应商名称长度不能超过30个字符")
    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getSupplierDescription() {
        return supplierDescription;
    }

    public void setSupplierDescription(String supplierDescription) {
        this.supplierDescription = supplierDescription;
    }

    @NotNull(message = "显示顺序不能为空")
    public Integer getContactId() {
        return contactId;
    }

    public void setContactId(Integer contactId) {
        this.contactId = contactId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("supplierId", getSupplierId())
                .append("supplierName", getSupplierName())
                .append("supplierDescription", getSupplierDescription())
                .append("contactId", getContactId())
                .toString();
    }
}
